import request from '../../utils/request';
import store from '../../store/index';

// 发送摇一摇分数
export function sendScore(score) {
  return request.post('play/shangfen26', {
    splid: store.state.live.liveId,
    playInfo: 'hmPlay6',
    fenshu: score,
    userId: store.state.user.userId,
  });
}
// 获取摇一摇排行榜
export function getRank(gameCode) {
  return request.get(`play/newChaKeLaList6?splid=${store.state.live.liveId}&userId=${store.state.user.userId}&playInfo=${gameCode}`);
}

export function sendCattleScore(score) {
  return request.post('play/shangfen26', {
    splid: store.state.live.liveId,
    playInfo: 'hmPlay8',
    fenshu: score,
    userId: store.state.user.userId,
  });
}
